cmake_minimum_required(VERSION 3.17)
set(APP_NAME mqtt_user_node)
project(${APP_NAME})
set(CMAKE_C_STANDARD 99)
set(EXECUTABLE_OUTPUT_PATH ${EXEC_PATH})

add_executable(${APP_NAME}
        CMqttDeviceLoginNode.cpp
        CMqttDeviceLoginNode.h
)

find_package(mqtt_cpp_iface REQUIRED)
target_link_libraries(${APP_NAME}
        mqtt_cpp_iface::mqtt_cpp_iface
        ${MODEL_DEVICE_LIB}
)

# 查找Boost库
find_package(Boost REQUIRED COMPONENTS thread)
if(NOT Boost_FOUND)
    message(FATAL_ERROR "Boost not found!")
endif()
target_link_libraries(${APP_NAME} ${Boost_LIBRARIES})

